package com.winenine999.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.winenine999.custom.dao.CPurchaseMapper;
import com.winenine999.generator.dao.PurchaseMapper;
import com.winenine999.jdbc.dao.PurchaseDao;
import com.winenine999.model.Page;
import com.winenine999.model.Purchase;
import com.winenine999.service.IPurchaseService;
@Service
public class PurchaseService implements IPurchaseService {
	@Autowired
	private PurchaseMapper purchaseMapper;
	@Autowired
	private CPurchaseMapper cPurchaseMapper;
	@Autowired
	private PurchaseDao purchaseDao;
	/**
	 * 根据id删除purchase
	 */
	@Override
	public int deleteByPrimaryKey(Integer id) {
		
		return purchaseMapper.deleteByPrimaryKey(id);
	}
	/**
	 * 选择字段插入purchase
	 */
	@Override
	public int insertSelective(Purchase purchase) {
		
		return purchaseMapper.insertSelective(purchase);
	}
	/**
	 * 选择字段修改purchase
	 */
	@Override
	public int updateByPrimaryKeySelective(Purchase purchase) {
		
		return purchaseMapper.updateByPrimaryKeySelective(purchase);
	}
	/**
	 * 根据id查询purchase
	 */
	@Override
	public Purchase selectByPrimaryKey(Integer id) {
		
		return purchaseMapper.selectByPrimaryKey(id);
	}
	/**
	 * 分页查询purchase
	 */
	@Override
	public Page findPagePurchase(Page page) {
		
		return purchaseDao.findPagePurchase(page);
	}

}
